package com.stormragetech.sylwanas.demo.process;

import com.alibaba.fastjson.JSONObject;
import com.stormragetech.sylwanas.common.ReturnInfo;
import com.stormragetech.sylwanas.demo.model.UserModel;
import com.stormragetech.sylwanas.demo.spring.service.TestService;
import com.stormragetech.sylwanas.process.MessageHandler;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * description: //TODO
 *
 * @author: Xue Bin
 * @version: 1.0.0-SNAPSHOT
 */
@Component
@Log4j2
public class UserProcess implements MessageHandler<UserModel> {

    @Autowired
    private TestService service;

    @Override
    public ReturnInfo handle(UserModel userModel) {

        log.info("user id: {} ----- name: {}", userModel, userModel);
        service.test();
        return new ReturnInfo("0000", "");
    }
}
